package com.zpeb.pdd.utils;

import javax.websocket.EncodeException;
import javax.websocket.EndpointConfig;
import com.alibaba.fastjson.JSON;

public class ServerEncoder implements javax.websocket.Encoder.Text<Msg>{

    @Override
    public void init(EndpointConfig endpointConfig) {

    }

    @Override
    public void destroy() {

    }
    @Override
    public String encode(Msg user) throws EncodeException {
        return JSON.toJSONString(user);
    }
}